
%!TEX program = xelatex
%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode

\documentclass[10pt]{article} 

\input{wang_preamble.tex}

\begin{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{center}
{\Large\bf \H 上海立信会计金融学院期终考试卷 } \hspace{0.3cm} {\Large \underline{ B }卷 解答}

\vspace{0.3cm}

{\large \bf \H 2020 $\sim$ 2021 学年 第 二 学期 }

\vspace{0.3cm}

{\large \bf \H \underline{ \emph{2019级数学与应用数学专业} } 《\underline{ \emph{应用随机过程} }》 课程代码：\underline{ 161190223}  }

\end{center}

\vspace{0.3cm}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{enumerate}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\item %题目1：

{\bf  Markov chains - concepts} - 10 Points 

%\item [E3.1.2.]  
A Markov chain $\{X_0,X_1,X_2,\cdots\}$ has the following transition probability matrix 
\begin{eqnarray*}
P=
\begin{blockarray}{cccc}
& 0 & 1 & 2 \\
\begin{block}{c[ccc]}
  0 & 0.2 & 0.2 & 0.6 \\
  1 & 0.3 & 0.4 & 0.3 \\ 
  2 & 0.5 & 0.2 & 0.3 \\
\end{block}
\end{blockarray}.
\end{eqnarray*}
Determine the conditional probabilities $\mathbb{P}\{X_2 =1,X_3 =2\mid X_1 =0\}$. 

{
\vspace{0.2cm}
\color{red}Solution. By the definition of conditional probability and Markov property, 
\begin{eqnarray*}
\mathbb{P}\{X_2 =1,X_3 =2\mid X_1 =0\} &=& \mathbb{P}\{X_2 =1\mid X_1 =0\} \mathbb{P}\{X_3 =2\mid X_2 =1, X_1 =0\} \\
&=& \mathbb{P}\{X_2 =1\mid X_1 =0\} \mathbb{P}\{X_3 =2\mid X_2 =1\} \\ 
&=& p_{01}p_{12} \\ 
&=& (0.2)(0.3) \\
&=& 0.06.
\end{eqnarray*}

}

\vspace{1cm}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\item %题目2：

{\bf  Markov chains - first step analysis} - 15 Points

%\item [E3.4.1.] 
Find the mean time to reach state 2 starting from state 0 for the Markov chain whose transition probability matrix is $P$. 

\begin{multicols}{2}
$%\begin{eqnarray*}
P=
\begin{blockarray}{cccc}
& 0 & 1 & 2  \\
\begin{block}{c[ccc]}
  0 & 0.7 & 0.2 & 0.1 \\
  1 & 0    & 0.6 & 0.4 \\ 
  2 & 0    & 0   &  1 \\
\end{block}
\end{blockarray}.
$%\end{eqnarray*}

\tikz{
\node [circle, draw] (a0) at (0,2) {0}; 
\node [circle, draw] (a1) at (2,2) {1}; 
\node [circle, draw] (a2) at (2,0.5) {2}; 

\graph {(a0) ->  (a1) };
\graph {(a0) ->  (a2) };
\graph {(a1) ->  (a2) };
}

\end{multicols}

{
\vspace{0.2cm}
\color{red}Solution. Starting from state 0, in a single step, it either stays at state 0, or goes to state 1, or goes to state 2. Let $m_{ij}$ be the mean number of steps it takes from state $i$ to reach state $j$. Then we get the following system of equations
\begin{eqnarray*}
\left\{\begin{array}{rcl}
m_{01} &=& p_{00}\cdot (1+m_{01}) + p_{01}\cdot 1, \\
m_{02} &=& p_{00}\cdot (1+m_{02}) + p_{01}\cdot (1+m_{12}) + p_{02}\cdot 1, \\
m_{12} &=& p_{11}\cdot (1+m_{12}) + p_{12}\cdot 1.
\end{array}\right.
\end{eqnarray*}
From these equations we get $m_{12}=5/2$, $m_{02}=5$ and $m_{01}=3$. 
}

\newpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\item %题目3：

{\bf  Markov chains - long run behavior } - 15 Points

%\item [P4.1.1.] 
Three balls are distributed between two urns, labeled A and B. Each period, an urn is selected at random, and if it is not empty, a ball from that urn is removed and placed into the other urn. In the long run what fraction of time is urn A empty?

{
\vspace{0.2cm}
\color{red}Solution. Let $X_n$ be the number of balls in urn A after $n$ draws. Then $\{X_n,n\ge 0\}$ is a Markov chain, with state space $S=\{0,1,2,3\}$ and transition probability matrix
\begin{eqnarray*}
P=
\begin{blockarray}{ccccc}
& 0 & 1 & 2  & 3\\
\begin{block}{c[cccc]}
  0 & 0.5 & 0.5 & 0    & 0 \\
  1 & 0.5 & 0    & 0.5 & 0 \\ 
  2 & 0    & 0.5 & 0    & 0.5 \\
  3 & 0    & 0   &  0.5 & 0.5 \\
\end{block}
\end{blockarray}.
\end{eqnarray*}
This is a regular Markov chain, thus its limiting distribution is its stable distribution. We solve the equation $\pi P=\pi$ and get $\pi=(\pi_0,\pi_1, \pi_2,\pi_3)=(1/4,1/4,/1/4,1/4)$. In the long run, there is a fraction of 1/4 time the urn A is empty. 

}

\vspace{1cm}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\item %题目4：

{\bf  Poisson processes - concepts } - 15 Points

%\item [E5.1.1.] 
Defects occur along the length of a filament at a rate of $\lambda$ per meter.
\begin{enumerate}
\item  Calculate the probability that there are exactly a single defect in the first meter of the filament.
\item  Calculate the conditional probability that there are no defects in the second meter of the filament, given that the first meter contained a single defect.
\end{enumerate}

{
\vspace{0.2cm}
\color{red}Solution. Let $X(t)$ be the number of defects on the $(0,t]$ meters of the filament. Then $\{X(t),t\ge 0\}$ is a Poisson process of rate $\lambda$. 
\begin{enumerate}
\item  Since $X(1)\sim \text{pois}(\lambda)$, we get 
$$\mathbb{P}\{X(1)=1\} = \lambda e^{-\lambda}.$$ 
\item  Since $X(2)-X(1)$ is independent of $X(1)$, and $X(2)-X(1)\sim \text{pois}(\lambda)$, we get 
$$\mathbb{P}\{X(2)-X(1)=0 \mid X(1)=1\} = \mathbb{P} \{X(2)-X(1)=0\} = e^{-\lambda}.$$

\end{enumerate}

}

\newpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\item %题目5：

{\bf  Poisson processes - associated distributions } - 15 Points

%\item [E5.3.1.] 
A radioactive source emits particles according to a Poisson process of rate $\lambda$ particles per minute. 
Let $W_n$ be the time that the $n$th particle emits. 
\begin{enumerate}
\item  What is the probability that the first particle appears after 5 minutes?
\item  Find the conditional expectation $\mathbb{E}\{W_3\mid W_1=5\}$.
\end{enumerate}

{
\vspace{0.2cm}
\color{red}Solution. Let $X(t)$ be the number of particles that has emitted during the time interval $(0,t]$, where $t$ is measured in minutes. Then $\{X(t),t\ge 0\}$ is a Poisson process of rate $\lambda$. 
\begin{enumerate}
\item  Since $W_1\sim \text{Exp}(\lambda)$, we get the tail probability of this exponential distribution
$$\mathbb{P}\{ W_1>5\} = e^{-5\lambda}.$$ 
\item  Let $S_i$ be the sojourn time in state $i$. We are given the condition $S_0=W_1=5$. Since these sojourn times are independent with each other, and all have the same exponential distribution, from $W_3=S_0+S_1+S_2$ we see that 
$$\mathbb{E}\{W_3 \mid W_1=5\} = 5+\mathbb{E}\{S_1\}+\mathbb{E}\{S_2\} = 5+\frac{2}{\lambda}.$$ 
\end{enumerate}

}

\vspace{1cm}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\item %题目6：

{\bf  Markov chains - continuous time} - 15 Points

%\item [E6.1.1.] 
A pure birth process starting from $X(0) = 0$ has birth parameters $\lambda_0 = 3$ and $\lambda_1 = 5$. 
Let $P_n(t)=\mathbb{P}\{X(t)=n\}$. Determine $P_0(t)$ and $P_1(t)$.

Hint. You may need the differential equations \\
$%\begin{eqnarray*}
\left\{\begin{array}{rcl}
P_0'(t) &=& -\lambda_0 P_0(t), \\
P_1'(t) &=& -\lambda_1 P_1(t) + \lambda_0P_0(t).
\end{array}\right.
$%\end{eqnarray*}

{
\vspace{0.2cm}
\color{red}Solution. 
The solution to the equation $P_0'(t)=-3P_0(t)$ with initial condition $P_0(0)=1$ is $$P_0(t)=e^{-3t}.$$ 
The solution to the equation $P_1'(t) = -5 P_1(t) + 3e^{-3t}$ with initial condition $P_1(0)=0$ is 
$$P_1(t)=\frac{3}{2}e^{-3t} - \frac{3}{2}e^{-5t}.$$ 


}

\newpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\item %题目7：

{\bf  Brownian motions } - 15 Points

%\item [E8.1.1.] 
Let $\{B(t); t \ge 0\}$ be the standard Brownian motion with $B(0) = 0$. 
\begin{enumerate}
\item  Evaluate $\mathbb{P}\{B(100) \ge 4\}$.
\item  Find the number $c$ for which $\mathbb{P}\{B(100) \ge c\} = 0.05$.
\end{enumerate}

{
\vspace{0.2cm}
\color{red}Solution. 
\begin{enumerate}
\item  By the definition of standard Brownian motion, $B(100)\sim N(0,100)$. Thus 
$$\mathbb{P}\{ B(100)\ge 4\} = \mathbb{P}\left\{ \frac{B(100)}{10}\ge \frac{4}{10} \right\} = 1-\Phi(0.2).$$

\item  Similarly, we compute the probability 
$$\mathbb{P}\{ B(100)\ge c\} = \mathbb{P}\left\{ \frac{B(100)}{10}\ge \frac{c}{10} \right\} = 1-\Phi(c/10)=0.05.$$
Thus $\Phi(c/10)=0.95$ and $c=10\Phi^{-1}(0.95)$. 

\end{enumerate}

With R software at hand we may easily find these values. 
{\color{blue}
\begin{verbatim}
> 1-pnorm(0.2)
[1] 0.4207403
> 10*qnorm(0.95)
[1] 16.44854
\end{verbatim}
}

}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\end{enumerate}




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\end{document}





